public class Point {
    int x,y;
    String name = "apoint";
Point(){
    x=0;
    y=0;
}
    Point(int x,int y,String name){
        this.x=x;
        this.y=y;
        this.name=name;
    }
    int getX(){
        return x;   //得到x的参数
    }
    int getY(){
        return y;  //得到y的参数
    }
    void move(int newX,int newY){
        x=newX;
        y=newY;
    }
    Point newPoint(String name){
        Point newP=new Point(-x,-y,name);
        return newP;
    }
    boolean equal(int x,int y){
        if (this.x==x&&this.y==y)
            return true;
        else
            return false;
    }
    void print(){
    System.out.println(name+":x="+x+"，y="+y);
    }
}
